1. Field of the Invention
The present invention relates to an image compression apparatus that compresses color image data. The present invention further relates to an image compression program that is used to relize the above-mentioned image compression apparatus in a computer.
2. Discussion of the Related Art
Conventionally, JPEG compression utilizing discrete cosine transformations and JPEG 2000 compression utilizing discrete wavelet transformations, etc., have been well known as standards for the compression of color image data.
In these compression standards, color image data is ordinarily transformed from an RGB color space into a luminance/chrominance color space such as a YCbCr color space. Of these signals, the chrominance signals are commonly subjected to subsampling processing (down-sampling) utilizing the human visual sensitivity characteristic that visual sensitivity with respect to chrominances is generally lower than visual sensitivity with respect to luminance.
FIGS. 8A through 8D are diagrams which show typical formats (4:4:4, 4.2:2, 4:2:0, 4:1:1) for such subsampling processing. Conventionally, in cases where irreversible compression is performed in an image compression apparatus mounted in an electronic camera, etc., the format of the above-mentioned subsampling processing is fixed beforehand. Accordingly, in this type of image compression apparatus, even if the compression parameters such as the target compression rate are altered there is no alteration of the subsampling rate of the chrominance signals.
Consequently, in the case of an image compression apparatus which is fixed at a coarse subsampling rate, image data that is rich in color variations cannot be adequately handled, which tends to cause problems such as a severe deterioration of color boundary information resulting in conspicuous jaggies, and a drop in the image S/N ratio at the time of expansion.
Furthermore, in the case of the 4:4:4 format in which the chrominance component is not subsampled, the amount of code assigned to the chrominance signals is increased, so that the amount of code assigned to the luminance signal is correspondingly decreased. As a result, in the case of high compression, the amount of code assigned to the chrominance signals overwhelms the amount of code assigned to the luminance signal, so that encoding distortion of the luminance signal tends to occur. For example, in the case of JPEG compression, the problem of block noise generation in the image occurs as a result of such encoding distortion.